<form class="layui-form layui-form-pane" action="{:url('', ['id' => $id, 'type' => $type])}" method="post" id="editForm">
{foreach $omiList as $info}
	<a name="{:arrayGet($info, 'is_msc', 0)==1?'msc':('cn'.$info['cloth_num'])}"></a>
	{:FormExt::showText('布号', arrayGet($info, 'is_msc', 0)==1?'库存面料':$info['cloth_num_full'], true)}
	{:FormExt::showText('米数', $info['length'], true)}

	<input type="hidden" name="table[{$info['id']}]" value="{:arrayGet($info, 'is_msc', 0)==1?1:0}">
	<div class="layui-form-item">
		<label class="layui-form-label">低层层数</label>
		<div class="layui-input-inline">
			<div class="layui-col-xs6"><input type="text" class="layui-input" tabindex=-1 value="{$info['caichuang_wheat_low']}" readonly></div>
			<div class="layui-col-xs6"><input type="text" class="layui-input" tabindex="1" name="caichuang_t_wheat_low[{$info['id']}]" value="{:filterZero($info['caichuang_t_wheat_low'])}" lay-verify="mimoint"></div>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">高层层数</label>
		<div class="layui-input-inline">
			<div class="layui-col-xs6"><input type="text" class="layui-input" tabindex=-1 value="{$info['caichuang_wheat_height']}" readonly></div>
			<div class="layui-col-xs6"><input type="text" class="layui-input" tabindex="1" name="caichuang_t_wheat_height[{$info['id']}]" value="{:filterZero($info['caichuang_t_wheat_height'])}" lay-verify="mimoint"></div>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">捆条</label>
		<div class="layui-input-inline">
			<div class="layui-col-xs6"><input type="text" class="layui-input" tabindex=-1 value="{:$omInfo['caichuang_strip_dosage']*$omInfo['yingcai_count']*1.1}" readonly></div>
			<div class="layui-col-xs6"><input type="text" class="layui-input" tabindex="1" name="caichuang_t_strip[{$info['id']}]" value="{:filterZero($info['caichuang_t_strip'])}" readonly lay-verify="mimonumber"></div>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">布头</label>
		<div class="layui-input-inline">
			<div class="layui-col-xs6"><input type="text" class="layui-input" tabindex=-1 value="{$info['caichuang_neadend']}" readonly></div>
			<div class="layui-col-xs6"><input type="text" class="layui-input" tabindex="1" name="caichuang_t_neadend[{$info['id']}]" value="{:filterZero($info['caichuang_t_neadend'])}" lay-verify="mimoint"></div>
		</div>
	</div>
	
	<div class="layui-form-item layui-form-text">
	    <label class="layui-form-label">备注</label>
	    <div class="layui-input-block">
			<textarea placeholder="请输入内容" name="caichuang_remark[{$info['id']}]" tabindex="1" class="layui-textarea">{$info['caichuang_remark']}</textarea>
	    </div>
	</div>

	<hr class="layui-bg-orange">
{/foreach}	

    <div class="pop-bottom-bar">
    	{if $omInfo['caichuang_pull_status'] == 0}
        	<button type="submit" class="layui-btn layui-btn-normal" lay-submit="" tabindex="1" lay-filter="formSubmit" hisi-data="{pop: true, refresh: false, jump: true}">提交保存</button>
        {/if}
        <a href="javascript:parent.layui.layer.closeAll();" tabindex="1" class="layui-btn layui-btn-primary ml10">取消</a>
    </div>
</form>

{include file="system@block/layui" /}

<script>
    layui.use(['form','tool'], function() {
        var $ = layui.jquery, form = layui.form;
        
        var regFloat = /((^[1-9]\d*)|^0)(\.\d{0,2}){0,1}$/; // 浮点数，小数点后两位
		var regInt = /^\d+$/; // 整数
        form.verify({
        	mimonumber: function(value, item){
        	    if (value=='') return '';
        	    if(! regFloat.test(value)){
        	    	return '只能填写数字';
        	    }
        	},
        	mimoint: function(value, item){
        	    if (value=='') return '';
        	    if(! regInt.test(value)){
        	    	return '只能填写数字';
        	    }
        	}
        });
		
		$("input[name=caichuang_t_wheat_low]").focus();
    });
</script>